package com.fulihui.wgj.facade.service.qrcode;


import com.fulihui.common.error.InvokeServiceException;
import com.fulihui.common.request.rpc.AppRequest;
import com.fulihui.common.result.rpc.BaseResult;
import com.fulihui.common.result.rpc.SimpleResult;
import com.fulihui.wgj.facade.dto.WxParamQrcodeInfoDTO;
import com.fulihui.wgj.facade.dto.WxQrcodeEventStatDTO;
import com.fulihui.wgj.facade.dto.WxQrcodeEventStatDetailDTO;
import com.fulihui.wgj.facade.dto.WxQrcodeReplyInfoDTO;
import com.fulihui.wgj.facade.request.qrcode.WxParamQrcodeSaveRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeEventStatRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeEventStatSqlRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeInfoQueryRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodePageQueryRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeQueryRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeReplyDeleteRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeReplyQueryOneRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeReplyRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeScanEventRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeStatDetailPageQueryRequest;
import com.fulihui.wgj.facade.request.qrcode.WxQrcodeStatDetailQueryRequest;
import com.fulihui.wgj.facade.result.qrcode.WxQrcodePageResult;
import com.fulihui.wgj.facade.result.qrcode.WxQrcodeStatDetailPageResult;

import java.util.List;

/**
 * 渠道二维码相关Service
 *
 * @author wang_wx
 * @date 2018-07-09
 */
public interface WxParamQrcodeService {

    /**
     * 查询单个二维码回复内容
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<WxQrcodeReplyInfoDTO> queryOneReplyInfo(WxQrcodeReplyQueryOneRequest request) throws InvokeServiceException;

    /**
     * 保存二维码回复
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult saveReplyInfo(WxQrcodeReplyRequest request) throws InvokeServiceException;

    /**
     * 根据主键删除二维码回复
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult deleteReplyInfo(WxQrcodeReplyDeleteRequest request) throws InvokeServiceException;

    /**
     * 记录二维码统计信息
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult saveStat(WxQrcodeEventStatRequest request) throws InvokeServiceException;

    /**
     * 记录二维码统计信息--根据SQL
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult saveStatBySql(WxQrcodeEventStatSqlRequest request) throws InvokeServiceException;

    /**
     * 查询渠道二维码统计-不分页
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxQrcodeEventStatDTO>> queryStatistics(WxQrcodeQueryRequest request) throws InvokeServiceException;

    /**
     * 查询渠道二维码统计-分页
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    WxQrcodePageResult pageQueryStatistics(WxQrcodePageQueryRequest request) throws InvokeServiceException;

    /**
     * 查询渠道二维码统计详情-不分页
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxQrcodeEventStatDetailDTO>> queryDetailStatistics(WxQrcodeStatDetailQueryRequest request) throws InvokeServiceException;

    /**
     * 查询渠道二维码统计详情-分页
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    WxQrcodeStatDetailPageResult pageQueryDetailStatistics(WxQrcodeStatDetailPageQueryRequest request) throws InvokeServiceException;

    /**
     * 创建渠道二维码
     *
     * @param saveRequest
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<WxParamQrcodeInfoDTO> saveParamQrcodeInfo(WxParamQrcodeSaveRequest saveRequest) throws InvokeServiceException;

    /**
     * 查询单个二维码信息
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<WxParamQrcodeInfoDTO> queryParamQrcodeInfo(WxQrcodeInfoQueryRequest request) throws InvokeServiceException;

    /**
     * 查询二维码信息列表
     *
     * @param request appId
     * @return
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxParamQrcodeInfoDTO>> queryParamQrcodeInfoByAppId(AppRequest request) throws InvokeServiceException;

    /**
     * 二维码扫描事件保存
     *
     * @param request
     * @return
     * @throws InvokeServiceException
     */
    BaseResult saveScanEvent(WxQrcodeScanEventRequest request) throws InvokeServiceException;

    /**
     * 二维码信息列表
     *
     * @param request
     * @return 仅存在渠道标签标识的 并包含标签名称
     * @throws InvokeServiceException
     */
    SimpleResult<List<WxParamQrcodeInfoDTO>> querySceneHasLabel(AppRequest request) throws InvokeServiceException;
}
